package com.ice.work.moment.facade.ticket.enums;

import com.honeybee.cloud.framework.base.exception.ExceptionEnum;
import lombok.Getter;

/**
 * @Description 异常enums
 * @Author DELL
 * @Create 2018-12-08
 * @Since 1.0.0
 */
public enum TicketBizExceptionEnum {
    COOKIE_NOT_FOUND(10, "无法获取cookie"),
    RESPONSE_NULL(11, "无法获取请求响应"),
    IMAGE_CHECK_EXP(12, "验证码识别异常"),
    REQUEST_EXP(13, "请求异常"),
    CHECK_POSITION_EXP(14, "检验验证码失败"),
    CREATE_QC_CODE_EXP(15, "创建登录二维码失败"),
    EXPIRE_QC_CODE_EXP(16, "登录二维码过期"),
    LOGIN_FAIL_EXP(17, "登录信息异常"),
    OUT_FAIL_EXP(18, "登出异常"),
    INTT_DATA_EXP(19, "初始化异常"),
    NOT_LOGIN_EXP(19, "登录信息异常");

    @Getter
    private Integer parentCode = ExceptionEnum.MISSING_REQUEST_PARAMETER_EXCEPTION.getCode();
    @Getter
    private Integer subCode;
    @Getter
    private String message;


    TicketBizExceptionEnum(Integer subCode, String message) {
        this.subCode = subCode;
        this.message = message;
    }

    public static String getParentMessage() {
        return ExceptionEnum.SERVICE.getRemark();
    }
}
